﻿// -----------------------------------------------------------------------
// <copyright file="TaskPaneFactory.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace ClearLines.Stocks.UserInterface
{
   using System;
   using System.Collections.Generic;
   using System.Linq;
   using System.Text;
   using Microsoft.Office.Interop.Excel;

   /// <summary>
   /// TODO: Update summary.
   /// </summary>
   public class TaskPaneBuilder
   {
      public static TaskPaneContainer Build(Application excel)
      {
         var taskPaneView = new TaskPaneView();
         var excelController = new ExcelController(excel);
         var taskPaneViewModel = new TaskPaneViewModel(excelController);
         taskPaneView.DataContext = taskPaneViewModel;

         var taskPaneContainer = new TaskPaneContainer();
         taskPaneContainer.TaskPaneViewHost.Child = taskPaneView;

         return taskPaneContainer;
      }
   }
}
